bitkeeper revision 1.1159.1.114 (4136e932LBZ1uaMs2kLCvyBHOfuxTQ)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 2 Sep 2004 09:34:42 +0000 (09:34 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 2 Sep 2004 09:34:42 +0000 (09:34 +0000)
Trap vifctl errors and warn.

tools/python/xen/xend/XendVnet.py

index 83506b6c6c810fb1cfa38ef83da994a409258732..9ef019e33306531d2b9934cc26db518eecbc00dc 100644 (file)
@@ -53,8 +53,11 @@ class XendVnetInfo:
         return vnet_cmd(['vnet.del', self.id])
 
     def vifctl(self, op, vif, vmac):
-        fn = self.vifctl_ops[op]
-        return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
+        try:
+            fn = self.vifctl_ops[op]
+            return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
+        except XendError:
+            log.warning("vifctl failed: op=%s vif=%s mac=%s", op, vif, vmac)
 
 class XendVnet:
     """Index of all vnets. Singleton.
@@ -72,8 +75,8 @@ class XendVnet:
             self.vnet[info.id] = info
             try:
                 info.configure()
-            except:
-                log.exception("Error configuring vnet")
+            except XendError, ex:
+                log.warning("Failed to configure vnet %s: %s", str(info.id), str(ex))
 
     def vnet_of_bridge(self, bridge):
         """Get the vnet for a bridge (if any).